import Layout from '@/layout';
// // 由于懒加载页面太多的话会造成webpack热更新太慢，所以开发环境不使用懒加载，只有生产环境使用懒加载
const _import = require('@/utils/util.import');
const meta = { auth: true, menuId: '/system' };
export default {
  path: '/system',
  meta: {
    ...meta,
    icon: 'setting',
    title: '系统管理',
  },
  component: Layout,
  children: ((basePath) => [
    {
      // /system/user
      path: `${basePath}/user`,
      component: _import('system/user'),
      name: 'user',
      meta: {
        ...meta,
        title: '用户管理',
      },
    },
    //用户管理-新增 start
    {
      path: `${basePath}/user/userAddPre`,
      component: _import('system/user/user-add/user-add-pre'),
      name: 'userAdd',
      meta: {
        ...meta,
        highlightTo: `${basePath}/user`,
      },
    },
    //用户管理-新增 end

    //用户管理-修改 start
    {
      path: `${basePath}/user/userChangePre`,
      component: _import('system/user/user-change/user-change-pre'),
      meta: {
        ...meta,
        highlightTo: `${basePath}/user`,
      },
    },
    {
      path: `${basePath}/user/userChangeConf`,
      component: _import('system/user/user-change/user-change-conf'),
      meta: {
        ...meta,
        highlightTo: `${basePath}/user`,
      },
    },
    {
      path: `${basePath}/user/userChangeRes`,
      component: _import('system/user/user-change/user-change-res'),
      meta: {
        ...meta,
        highlightTo: `${basePath}/user`,
      },
    },
    //用户管理-修改 end

    //用户管理-密码重置 start
    {
      path: `${basePath}/user/passWordResetPre`,
      component: _import('system/user/pass-word-reset/pass-word-reset-pre'),
      meta: {
        ...meta,
        highlightTo: `${basePath}/user`,
      },
    },
    {
      path: `${basePath}/user/passWordResetRes`,
      component: _import('system/user/pass-word-reset/pass-word-reset-res'),
      meta: {
        ...meta,
        highlightTo: `${basePath}/user`,
      },
    },
    //用户管理-密码重置 end

    {
      path: `${basePath}/role`,
      component: _import('system/role'),
      name: 'role',
      meta: {
        ...meta,
        title: '角色管理',
      },
    },
    {
      path: `${basePath}/role/add/add-pre`,
      component: _import('system/role/add/add-pre'),
      meta: {
        ...meta,
        title: '新增角色录入页',
        highlightTo: `${basePath}/role`,
      },
    },
    {
      path: `${basePath}/role/add/add-conf`,
      component: _import('system/role/add/add-conf'),
      meta: {
        ...meta,
        title: '新增角色确认页',
        highlightTo: `${basePath}/role`,
      },
    },
    {
      path: `${basePath}/role/add/add-res`,
      component: _import('system/role/add/add-res'),
      meta: {
        ...meta,
        title: '新增角色结果页',
        highlightTo: `${basePath}/role`,
      },
    },
    {
      path: `${basePath}/role/role-detail/role-detail-index`,
      component: _import('system/role/role-detail/role-detail-index'),
      meta: {
        ...meta,
        title: '角色详情页',
        highlightTo: `${basePath}/role`,
      },
    },
    {
      path: `${basePath}/role/role-detail/role-detail-pre`,
      component: _import('system/role/role-detail/role-detail-pre'),
      meta: {
        ...meta,
        title: '角色修改录入页',
        highlightTo: `${basePath}/role`,
      },
    },
    {
      path: `${basePath}/role/role-detail/role-detail-conf`,
      component: _import('system/role/role-detail/role-detail-conf'),
      meta: {
        ...meta,
        title: '角色修改确认页',
        highlightTo: `${basePath}/role`,
      },
    },
    {
      path: `${basePath}/role/role-detail/role-detail-res`,
      component: _import('system/role/role-detail/role-detail-res'),
      meta: {
        ...meta,
        title: '角色修改结果页',
        highlightTo: `${basePath}/role`,
      },
    },

    {
      path: `${basePath}/menu`,
      component: _import('system/menu'),
      meta: {
        ...meta,
        title: '菜单管理',
      },
    },
    {
      path: `${basePath}/operatelog`,
      component: _import('system/operate-log'),
      meta: {
        ...meta,
        title: '操作日志查询',
      },
    },
    {
      path: `${basePath}/logManagement`,
      component: _import('system/logManagement'),
      meta: {
        ...meta,
        title: '日志管理',
      },
    },
    {
      path: `${basePath}/calender`,
      component: _import('system/calender'),
      meta: {
        ...meta,
        title: '日历管理',
      },
    },
    // 参数配置
    {
      path: `${basePath}/paramConfig`,
      component: _import('system/paramConfig'),
      name: 'paramConfig',
      meta: {
        ...meta,
        title: '参数配置',
      },
    },
    {
      path: `${basePath}/messageReminder`,
      component: _import('system/messageReminder'),
      name:'messageReminder',
      meta: {
        ...meta,
        title: '消息提醒',
      },
    },
    {
      path: `${basePath}/systemManagement/systemeventDisposition`,
      component: _import('system/systemManagement/systemeventDisposition'),
      name:'systemeventDisposition',
      meta: {
        ...meta,
        title: '系统参数配置',
      },
    },
    {
      path: `${basePath}/systemManagement/systemDetails`,
      component: _import('system/systemManagement/systemDetails'),
      name:'systemDetails',
      meta: {
        ...meta,
        title: '系统参数配置详情',
      },
    },
    {
      path: `${basePath}/systemManagement/systemeventAdd`,
      component: _import('system/systemManagement/systemeventAdd'),
      name:'systemeventAdd',
      meta: {
        ...meta,
        title: '系统参数配置新增',
      },
    },
    {
      path: `${basePath}/smsTemplate/smsSearch`,
      component: _import('system/smsTemplate/smsSearch'),
      name:'smsSearch',
      meta: {
        ...meta,
        title: '短信模版管理',
      },
    },
    {
      path: `${basePath}/smsTemplate/smsAdd`,
      component: _import('system/smsTemplate/smsAdd'),
      name:'smsAdd',
      meta: {
        ...meta,
        title: '短信模版新增',
      },
    },
    {
      path: `${basePath}/smsTemplate/smsDetails`,
      component: _import('system/smsTemplate/smsDetails'),
      name:'smsDetails',
      meta: {
        ...meta,
        title: '短信模版详情',
      },
    },

  ])('/system'),
};
